#!/usr/bin/env bash
# TODO: Refactor

pushd ETL
mkdir -p build && pushd build
cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build . -- all #test
sudo cmake --build . -- install
popd # build
popd # ETL
pushd synfig-core
mkdir -p build && pushd build
cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fdiagnostics-color"
cmake --build . -- all
sudo cmake --build . -- install
popd # build
popd # synfig-core
pushd synfig-studio
mkdir -p build && pushd build
cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fdiagnostics-color"
cmake --build . -- all
sudo cmake --build . -- install
popd # build
popd # synfig-studio
